CREATE TABLE [dbo].[Log](
	[LogId] [bigint] IDENTITY(1,1) NOT NULL,
	[DateAdded] [datetime] NOT NULL,
	[EventType] [char](3) NOT NULL,
	[EventMessage] [nvarchar](1000) NOT NULL,
	[StackTrace] [nvarchar](max) NOT NULL,
	[CurrentUser] [varchar](100) NOT NULL,
	[Path] [varchar](1000) NOT NULL,
	[QueryString] [varchar](1000) NOT NULL,
	[Browser] [varchar](1000) NOT NULL,
	[UserHostAddress] [varchar](1000) NOT NULL,
	[UrlReferrer] [varchar](1000) NOT NULL,
 CONSTRAINT [PK_Log] PRIMARY KEY CLUSTERED 
(
	[LogId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Log_DateAdded]  DEFAULT (getdate()) FOR [DateAdded]
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Log_EventType]  DEFAULT ('ERR') FOR [EventType]
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Log_EventMessage]  DEFAULT ('') FOR [EventMessage]
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Log_StackTrace]  DEFAULT ('') FOR [StackTrace]
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Log_CurrentUser]  DEFAULT ('') FOR [CurrentUser]
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Table_1_RequestPath]  DEFAULT ('') FOR [Path]
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Table_1_RequestQueryString]  DEFAULT ('') FOR [QueryString]
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Log_Browser]  DEFAULT ('') FOR [Browser]
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Log_UserHostAddress]  DEFAULT ('') FOR [UserHostAddress]
GO

ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Log_UrlReferrer]  DEFAULT ('') FOR [UrlReferrer]
GO


